package com.codeZ.ObserverPattern.instance;

import java.util.Date;

/**
 * 开奖服务
 *
 * @author codeZhang
 * @Date 2024/8/26 11:11
 */
public class LotteryServiceImpl extends LotteryService {
    //注入摇号服务
    private final DrawHouseService houseService = new DrawHouseService();

    @Override
    public LotteryResult lottery(String uId) {
        //摇号
        String result = houseService.lots(uId);
        return new LotteryResult(uId, result, new Date());
    }
}
